/*
 * Copyright (c) 2023-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H
#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H

#include <vector>
#include <string>

namespace OHOS::Notification {
class ReminderOldTable {
public:
    // Reminder Table Basic Columns.
    static constexpr const char* TABLE_NAME = "reminder";
    static constexpr const char* REMINDER_ID = "reminder_id";
    static constexpr const char* PKG_NAME = "package_name";
    static constexpr const char* USER_ID = "user_id";
    static constexpr const char* UID = "uid";
    static constexpr const char* SYS_APP = "system_app";
    static constexpr const char* APP_LABEL = "app_label";
    static constexpr const char* REMINDER_TYPE = "reminder_type";
    static constexpr const char* REMINDER_TIME = "reminder_time";
    static constexpr const char* TRIGGER_TIME = "trigger_time";
    static constexpr const char* RTC_TRIGGER_TIME = "rtc_trigger_time";
    static constexpr const char* TIME_INTERVAL = "time_interval";
    static constexpr const char* SNOOZE_TIMES = "snooze_times";
    static constexpr const char* DYNAMIC_SNOOZE_TIMES = "dynamic_snooze_times";
    static constexpr const char* RING_DURATION = "ring_duration";
    static constexpr const char* IS_EXPIRED = "is_expired";
    static constexpr const char* IS_ACTIVE = "is_active";
    static constexpr const char* STATE = "state";
    static constexpr const char* ZONE_ID = "zone_id";
    static constexpr const char* HAS_SCHEDULED_TIMEOUT = "has_ScheduledTimeout";
    static constexpr const char* ACTION_BUTTON_INFO = "button_info";
    static constexpr const char* CUSTOM_BUTTON_URI = "custom_button_uri";
    static constexpr const char* SLOT_ID = "slot_id";
    static constexpr const char* SNOOZE_SLOT_ID = "snooze_slot_id";
    static constexpr const char* NOTIFICATION_ID = "notification_id";
    static constexpr const char* TITLE = "title";
    static constexpr const char* CONTENT = "content";
    static constexpr const char* SNOOZE_CONTENT = "snooze_content";
    static constexpr const char* EXPIRED_CONTENT = "expired_content";
    static constexpr const char* AGENT = "agent";
    static constexpr const char* MAX_SCREEN_AGENT = "maxScreen_agent";
    static constexpr const char* TAP_DISMISSED = "tapDismissed";
    static constexpr const char* AUTO_DELETED_TIME = "autoDeletedTime";
    static constexpr const char* REPEAT_DAYS_OF_WEEK = "repeat_days_of_week";
    static constexpr const char* GROUP_ID = "groupId";
    static constexpr const char* CUSTOM_RING_URI = "custom_ring_uri";
    static constexpr const char* CREATOR_BUNDLE_NAME = "creator_bundle_name";

    // Reminder Table Calendar Columns.
    static constexpr const char* REPEAT_DAYS = "repeat_days";
    static constexpr const char* REPEAT_MONTHS = "repeat_months";
    static constexpr const char* FIRST_DESIGNATE_YEAR = "first_designate_year";
    static constexpr const char* FIRST_DESIGNATE_MONTH = "first_designate_month";
    static constexpr const char* FIRST_DESIGNATE_DAY = "first_designate_day";
    static constexpr const char* CALENDAR_YEAR = "calendar_year";
    static constexpr const char* CALENDAR_MONTH = "calendar_month";
    static constexpr const char* CALENDAR_DAY = "calendar_day";
    static constexpr const char* CALENDAR_HOUR = "calendar_hour";
    static constexpr const char* CALENDAR_MINUTE = "calendar_minute";

    // Reminder Table Alarm Columns.
    static constexpr const char* ALARM_HOUR = "alarm_hour";
    static constexpr const char* ALARM_MINUTE = "alarm_minute";

    static void InitDbColumns();
    static std::string ADD_COLUMNS;
    static std::string SELECT_COLUMNS;

private:
    static void InitBasicColumns();
    static void InitCalendarColumns();
    static void InitAlarmColumns();
    static void AddColumn(const std::string& name, const std::string& type, bool isEnd = false);
};

class ReminderBaseTable {
public:
    /*
     * reminder base table name
     */
    static constexpr const char* TABLE_NAME = "reminder_base";

    /*
     * reminder base table field
     */
    static constexpr const char* REMINDER_ID = "reminder_id";
    static constexpr const char* PACKAGE_NAME = "package_name";
    static constexpr const char* USER_ID = "user_id";
    static constexpr const char* UID = "uid";
    static constexpr const char* SYSTEM_APP = "system_app";
    static constexpr const char* REMINDER_TYPE = "reminder_type";
    static constexpr const char* REMINDER_TIME = "reminder_time";
    static constexpr const char* TRIGGER_TIME = "trigger_time";
    static constexpr const char* TIME_INTERVAL = "time_interval";
    static constexpr const char* SNOOZE_TIMES = "snooze_times";
    static constexpr const char* DYNAMIC_SNOOZE_TIMES = "dynamic_snooze_times";
    static constexpr const char* RING_DURATION = "ring_duration";
    static constexpr const char* IS_EXPIRED = "is_expired";
    static constexpr const char* STATE = "state";
    static constexpr const char* ACTION_BUTTON_INFO = "button_info";
    static constexpr const char* CUSTOM_BUTTON_URI = "custom_button_uri";
    static constexpr const char* SLOT_ID = "slot_id";
    static constexpr const char* SNOOZE_SLOT_ID = "snooze_slot_id";
    static constexpr const char* NOTIFICATION_ID = "notification_id";
    static constexpr const char* TITLE = "title";
    static constexpr const char* TITLE_RESOURCE_ID = "title_resource_id";
    static constexpr const char* CONTENT = "content";
    static constexpr const char* CONTENT_RESOURCE_ID = "content_resource_id";
    static constexpr const char* SNOOZE_CONTENT = "snooze_content";
    static constexpr const char* SNOOZE_CONTENT_RESOURCE_ID = "snooze_content_resource_id";
    static constexpr const char* EXPIRED_CONTENT = "expired_content";
    static constexpr const char* EXPIRED_CONTENT_RESOURCE_ID = "expired_content_resource_id";
    static constexpr const char* WANT_AGENT = "want_agent";
    static constexpr const char* MAX_SCREEN_WANT_AGENT = "max_screen_want_agent";
    static constexpr const char* TAP_DISMISSED = "tap_dismissed";
    static constexpr const char* AUTO_DELETED_TIME = "auto_deleted_time";
    static constexpr const char* GROUP_ID = "group_id";
    static constexpr const char* CUSTOM_RING_URI = "custom_ring_uri";
    static constexpr const char* CREATOR_BUNDLE_NAME = "creator_bundle_name";
    static constexpr const char* CREATOR_UID = "creator_uid";
    static constexpr const char* RING_CHANNEL = "ring_channel";

public:
    static void InitDbColumns();

public:
    static std::string ADD_COLUMNS;
    static std::string SELECT_COLUMNS;
};

class ReminderAlarmTable {
public:
    /*
     * reminder alarm table name
     */
    static constexpr const char* TABLE_NAME = "reminder_alarm";

    /*
     * reminder timer table field
     */
    static constexpr const char* REMINDER_ID = "reminder_id";
    static constexpr const char* ALARM_HOUR = "alarm_hour";
    static constexpr const char* ALARM_MINUTE = "alarm_minute";
    static constexpr const char* REPEAT_DAYS_OF_WEEK = "repeat_days_of_week";

public:
    static void InitDbColumns();

public:
    static std::string ADD_COLUMNS;
    static std::string SELECT_COLUMNS;
};

class ReminderCalendarTable {
public:
    /*
     * reminder calendar table name
     */
    static constexpr const char* TABLE_NAME = "reminder_calendar";

    /*
     * reminder calendar table field
     */
    static constexpr const char* REMINDER_ID = "reminder_id";
    static constexpr const char* FIRST_DESIGNATE_YEAR = "first_designate_year";
    static constexpr const char* FIRST_DESIGNATE_MONTH = "first_designate_month";
    static constexpr const char* FIRST_DESIGNATE_DAY = "first_designate_day";
    static constexpr const char* CALENDAR_DATE_TIME = "calendar_date_time";
    static constexpr const char* CALENDAR_END_DATE_TIME = "calendar_end_date_time";
    static constexpr const char* REPEAT_DAYS = "repeat_days";
    static constexpr const char* REPEAT_MONTHS = "repeat_months";
    static constexpr const char* REPEAT_DAYS_OF_WEEK = "repeat_days_of_week";
    static constexpr const char* RRULE_WANT_AGENT = "rrule_want_agent";
    static constexpr const char* EXCLUDE_DATES = "exclude_dates";
    static constexpr const char* CALENDAR_LAST_DATE_TIME = "calendar_last_date_time";

public:
    static void InitDbColumns();

public:
    static std::string ADD_COLUMNS;
    static std::string SELECT_COLUMNS;
};

class ReminderTimerTable {
public:
    /*
     * reminder timer table name
     */
    static constexpr const char* TABLE_NAME = "reminder_timer";

    /*
     * reminder timer table field
     */
    static constexpr const char* REMINDER_ID = "reminder_id";
    static constexpr const char* TRIGGER_SECOND = "trigger_second";
    static constexpr const char* START_DATE_TIME = "start_date_time";
    static constexpr const char* END_DATE_TIME = "end_date_time";

public:
    static void InitDbColumns();

public:
    static std::string ADD_COLUMNS;
    static std::string SELECT_COLUMNS;
};
}  // namespace OHOS::Notification
#endif  // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_TABLE_H
